import cv2
import imutils
import numpy as np
import os
from Fuzzy_scanning1 import Fuzzyscan
#填涂点两个特征识别主程序
def main1(M):
    #批量读取
    list=[]
    length=len(os.listdir("dataset\\db1"))

    #读入图片地址
    for i in range(length):
        list.append("dataset\\db1\\{}.jpg".format(str(i+1))) 
    x=[]
    #对读入的图片批量操作
    for j in range(length):
        image=cv2.imread(list[j])
        grayimage = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)#灰度
        _O, binaryimage = cv2.threshold(grayimage, 0, 255, cv2.THRESH_BINARY_INV | cv2.THRESH_OTSU)
        
        x.append(Fuzzyscan (binaryimage,grayimage))
        #print(j+1,x)#直接输出结果
        
      
    return x











